﻿using AiFrame.InterfaceLib.MVP;
using AiFrame.InterfaceLib.Plugins;
using AiFrame.InterfaceLib.Windows.UI;

namespace AiFrame.Base.Core.Plugins
{
    public class CoreInterfaceFactory: ICoreInterfaceFactory
    {
        private IWindowManager<IWindow> _windowManager;
        private INavigationBar _navigationBar;
        private IStyleGuideUI _styleGuideUI;
        private IToolBarManager _toolBarManager;
        private IMainMenu _mainMenu;

        public ICoreInterface CreateCoreInterface()
        {
            return new CoreInterface(_windowManager, _navigationBar, _styleGuideUI,
                PluginManagerLoader.Instance().GetPluginManager().GetApplicationTheme(), _toolBarManager, _mainMenu);
        }

        public CoreInterfaceFactory(IWindowManager<IWindow> windowManager, INavigationBar navigationBar,
                                    IStyleGuideUI styleGuideUI, IToolBarManager toolBarManager, IMainMenu mainMenu)
        {
            _windowManager = windowManager;
            _navigationBar = navigationBar;
            _styleGuideUI = styleGuideUI;
            _toolBarManager = toolBarManager;
            _mainMenu = mainMenu;
        }
    }
}